package _14String和byte的相互转换;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Arrays;

public class Demo {

    public static void main(String[] args) throws IOException {
        FileOutputStream fos = new FileOutputStream("day10/abd/aa/c.txt",true);


        //String转byte
        String s ="abc";
        byte[] bytes = s.getBytes();
        System.out.println(Arrays.toString(bytes));
        //fos.write(bytes);
       // fos.close();

        //bytes转String
        String s1 = new String(bytes);
        System.out.println(s1);

    }
}
